#pragma once
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>

#define DFL_MODE 0666
#define FFLUSH_LINE 1
#define SIZE_BUFFER 1024

typedef struct _myFILE
{
    int fileno;
    int flag;
    char buffer[SIZE_BUFFER];
    int end;
}myFILE;

myFILE* my_fopen(const char* path, const char* mode);
int my_fwrite(const char* str, int num, myFILE* stream);
int my_fflush(myFILE* stream);
int my_fclose(myFILE* stream);
